package com.stylefeng.guns.modular.model.service.impl;

import com.stylefeng.guns.modular.system.model.Order;
import com.stylefeng.guns.modular.system.dao.OrderMapper;
import com.stylefeng.guns.modular.model.service.IOrderService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liuyulong
 * @since 2018-08-01
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
    @Autowired
    private  OrderMapper orderMapper;
    @Override
    public List<Order> getByOrderId(String state) {

        return orderMapper.getByOrderId(state);
    }

    @Override
    public  Object selectorderById(String state) {
        return this.baseMapper.selectorderById(state);
    }

//    @Override
//    public List<Order> selectOrderByUserId(String openid,Integer state) {
//        return this.orderMapper.selectOrderByUserId(openid,state);
//    }

    @Override
    public List<Order> selectOrderByUserId(String openid) {
        return this.orderMapper.selectOrderByUserId(openid);
    }

    @Override
    public List<Order> selectOrderByOpenId(String openid,Integer state) {
        return this.orderMapper.selectOrderByOpenId(openid,state);
    }

    @Override
    public List<Map<String, Object>> selectByOpenidState(String openid, Integer state) {
        return this.orderMapper.selectByOpenidState(openid,state);
    }

    @Override
    public Order selcetByUserid(Integer userid, Integer state) {
        return this.orderMapper.selcetByUserid(userid,state);
    }

    @Override
    public Order selcetByNewdate(Date newdate, Integer userid, Integer state,Integer lineid) {
        return this.orderMapper.selcetByNewdate(newdate,userid,state,lineid);
    }

    @Override
    public Order selcetByUseridLineId(Integer userid, Integer state, Integer lineid) {
        return this.orderMapper.selcetByUseridLineId(userid,state,lineid);
    }

    @Override
    public Order selcetByOrderdState(Integer orderid, Integer state) {
        return this.orderMapper.selcetByOrderdState(orderid,state);
    }
}
